﻿<%@ Page Language="c#" CodeBehind="EditJump.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.UnitiveDocument.DocumentFlowPages.EditJumpPage" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>EditJump</title>
  <uds:Style runat="server" Href="~/css/BasicLayout.css" />
  <script type="text/javascript">
  //<!--
  function delete_confirm(e) {
    if (event.srcElement.outerText == "删除")
      event.returnValue = confirm("您确认要删除?");
  }
  document.onclick = delete_confirm;

  var s_changeFlowStepId = parseInt('<%= ChangeFlowStepID %>', 10);
  function on_changestep(ddl) {
    var step = parseInt(ddl.options[ddl.selectedIndex].value, 10);
    document.getElementById('<%= ddFlow.ClientID %>').style.display = (step == s_changeFlowStepId) ? '' : 'none';
  }
  //-->
  </script>
</head>
<body>
  <form id="Form1" method="post" runat="server">
  <uds:PageTitle runat="server">
    <TitlePanel>步骤跳转：<asp:Label ID="labTitle" runat="server" />
    </TitlePanel>
  </uds:PageTitle>
  <table class="fixedTable" width="100%" style="width: 100%;">
    <colgroup>
      <col style="width: 100px;" />
      <col style="width: 100%;" />
    </colgroup>
    <tr>
      <td class="right">条件判断</td>
      <td>
        <asp:DropDownList ID="ddFieldName" runat="server" Width="150px" />
        &nbsp;
        <uds:FlowJumpComparisonModeDropDownList runat="server" ID="ddComparisonMode" Width="77px" />
        &nbsp;
        <uds:IntegerTextBox runat="server" ID="txtContant" Required="true" Width="58" CssClass="inputcss" Text="0" />
      </td>
    </tr>
    <tr>
      <td class="right">分支跳转</td>
      <td>
        <asp:DropDownList ID="ddStep" runat="server" Width="150px" Height="20px" onchange="on_changestep(this);" />
        <asp:DropDownList ID="ddFlow" runat="server" Width="200px" Style="display: none;" />
      </td>
    </tr>
    <tr>
      <td class="right">流转规则</td>
      <td>
        <uds:FlowRuleDropDownList runat="server" ID="ddlFlowRule" Width="84px" />
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>
        <p>
          <asp:Button ID="cmdInsert" AccessKey="a" runat="server" CssClass="buttoncss" Text="新增" />
          <uds:RedirectButton runat="server" ID="btnReturn" AccessKey="r" Text="返回" CssClass="buttoncss" />
        </p>
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <uds:UDSDataGrid ID="dgJumpList" runat="server" OnPageIndexChanged="DataGrid_PageChanged" DataKeyField="Priority" OnEditCommand="MyGrid_Move" OnDeleteCommand="MyGrid_Delete">
          <Columns>
            <asp:BoundColumn DataField="Priority" HeaderText="优先">
              <HeaderStyle Width="10%" />
            </asp:BoundColumn>
            <asp:BoundColumn DataField="FieldDescription" HeaderText="字段">
              <HeaderStyle HorizontalAlign="Center" Width="10%" />
              <ItemStyle HorizontalAlign="Center" />
            </asp:BoundColumn>
            <asp:TemplateColumn HeaderText="比较">
              <HeaderStyle Width="10%" />
              <ItemTemplate>
                <%# Utility.GetEnumDescription( ((FlowJump)Container.DataItem).ComparisonMode ) %>
              </ItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="CompareValue" HeaderText="数字">
              <HeaderStyle Width="10%" />
            </asp:BoundColumn>
            <asp:TemplateColumn HeaderText="规则">
              <HeaderStyle Width="10%" />
              <ItemTemplate>
                <%# Utility.GetEnumDisplayName( ((FlowJump)Container.DataItem).FlowRule ) %>
              </ItemTemplate>
              <EditItemTemplate>
              </EditItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="StepToName" HeaderText="转到步骤">
              <HeaderStyle Width="20%" />
            </asp:BoundColumn>
            <asp:ButtonColumn Text="删除" HeaderText="操作" CommandName="Delete">
              <HeaderStyle Width="6%" />
            </asp:ButtonColumn>
            <asp:EditCommandColumn ButtonType="LinkButton" UpdateText="更新" HeaderText="位置" CancelText="取消" EditText="上移">
              <HeaderStyle Width="6%" />
            </asp:EditCommandColumn>
          </Columns>
        </uds:UDSDataGrid>
      </td>
    </tr>
  </table>
  </form>
</body>
</html>
